with ZAPATERIA;
with Ada.Text_IO;

use  ZAPATERIA;
use Ada.Text_IO;

procedure Main  is

   it : ZAPATERIA.Item;
   flag: boolean := true;
   i: integer := 0;
begin
   it.dir := 1;
   it.zap := 0;

   SetArchivoLog("tp2.txt");

   while (flag) loop
      Put_Line ("Entregando zapatos " & Integer'image(i+1));
      it.dir := it.dir + 17; --otra direccion
      it.zap := it.zap + 1;  --otro zapato
      Arreglar (it.dir,it.zap);
      i:= i+1;
      if i = 20 then -- ciclo de 20 zapatos reparados.
        flag := false;
      end if;
   end loop;
   Put_Line ("Fin entrega");
end Main;
